package s2elinshu;

import java.util.Scanner;

public class J05Ex31CreditCard {
	public static void main(String[] args) {
		/*
		 * Scanner sc = null; String title = "신용카드 번호를 입력하세요"; String result =
		 * ""; int a = 0;
		 * 
		 * sc = new Scanner(System.in); System.out.println(title); a =
		 * sc.nextInt();
		 * 
		 * if(a==356317){ result = ("NH농협카드"); } else if(a==356901){ result =
		 * ("신한카드"); } else if(a==356912){ result = ("KB국민카드"); } else
		 * if(a==404825){ result = ("비씨카드"); } else if(a==438676){ result =
		 * ("신한카드"); } else if(a==457973){ result = ("국민카드"); } else
		 * if(a==515594){ result = ("신한카드"); } else if(a==524353){ result =
		 * ("외환카드"); } else { result = ("국민은행"); }
		 * 
		 * System.out.println(a); System.out.println(result); sc.close();
		 */

		Scanner sc = null;
		String title = "신용카드 번호를 입력하세요";
		String result = "";
		int a = 0;
		int cardNo1 = 0; 
		int cardNo2 = 0;

		sc = new Scanner(System.in);
		System.out.println(title);
		a = sc.nextInt();

		
		cardNo1 = a/10000;
		cardNo2 = a/100000;
		if(cardNo1==35){
		switch (a) {
		case 356317:
			result = "NH농협카드";
			break;
		case 356901:
			result = "신한카드";
			break;
		default:
			result = "잘못된 카드번호입니다.";
			break;
		}
		}
		else if(cardNo2==4){
			switch (a) {
			case 404825:
				result = "비씨카드";
				break;
			case 438676:
				result = "신한카드";
				break;
			default:
				result = "잘못된 카드번호입니다.";
				break;
			}
			}
			
		
		System.out.println(a);


		System.out.println(result);
		
		sc.close();

	}
}
